package icu.xuyijie.mysecondspringboot.timer;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 徐一杰
 * @date 2024/12/13 13:52
 * @description 定时任务
 */
@Component
public class TestTimer {

    @Scheduled(fixedDelay = 5000)
    public void print(){
        System.out.println(new Date());
    }

}
